<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>Excel演示</title>
		<link rel="stylesheet" href="jexcel/css/jexcel.css"/>
		<link rel="stylesheet" href="jexcel/css/jsuites.css"/>
		<script src="jexcel/js/jexcel.js"></script>
		<script src="jexcel/js/jsuites.js"></script>
	</head>
	<body>
		<div id="mytable" style="height: 300px; overflow: auto"></div>
	</body>
	<script>
		var data = [
			['12', '10', 'Honda', '2019-02-12', '', true, '20', '#777700'],
			['13', '10', 'Honda', '2018-07-11', '', true, '30', '#007777'],
			['13', '10', 'Honda', '2018-07-11', '', true, '30', '#007777'],
			['13', '10', 'Honda', '2018-07-11', '', true, '30', '#007777'],
			['13', '10', 'Honda', '2018-07-11', '', true, '30', '#007777'],
			['13', '10', 'Honda', '2018-07-11', '', true, '30', '#007777'],
			['13', '10', 'Honda', '2018-07-11', '', true, '30', '#007777'],
			['13', '10', 'Honda', '2018-07-11', '', true, '30', '#007777'],
			['13', '10', 'Honda', '2018-07-11', '', true, '30', '#007777'],
			['13', '10', 'Honda', '2018-07-11', '', true, '30', '#007777'],
			['13', '10', 'Honda', '2018-07-11', '', true, '30', '#007777'],
			['13', '10', 'Honda', '2018-07-11', '', true, '30', '#007777'],
			['13', '10', 'Honda', '2018-07-11', '', true, '30', '#007777']
		];

		var mytable = jexcel(document.getElementById('mytable'), {
			data:data,
			columns: [
				{ type: 'text', title:'测试1', width:120},
				{ type: 'text', title:'测试s', width:120},
				{ type: 'dropdown', title:'测试2', width:200, source:["Alfa Romeo", "Audi", "Bmw"]},
				{ type: 'calendar', title:'测试3', width:200},
				{ type: 'image', title:'测试4', width:120},
				{ type: 'checkbox', title:'测试5', width:80},
				{ type: 'numeric', title:'测试6', width:100, mask:'$ #.##,00', decimal:','},
				{ type: 'color', width:100, render:'square'}
			 ]
		});
		var index = 0;	//行号
		var rowdata = mytable.getRowData(index);	//获取行数据
		console.log(rowdata);
	</script>
</html>
